From patchwork Fri Sep 13 09:55:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3468 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 6B69F411AB for ; Fri, 13 Sep 2024 11:57:03 +0200 (CEST) Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a8a92ab4dd0sf109301766b.1 for ; Fri, 13 Sep 2024 02:57:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726221423; cv=pass; d=google.com; s=arc-20240605; b=X7IfWOlQkiUjhH0ifqSSU/ksx6qAdeTV8WM4nvx0LMjqepo0ezamPGDAjiY+Mi2LmC ofNAPWW0NSXy4WaicmC45f6a7yF0lPUV64v3lIcXz+m7zl9BCMmL0O+N2AUh51wvx0nu O9H3RaFryrj0Lla4Lbltf3bMhrly3mMHSl3Kfb/l3tqL59pISMKNNFVEOU4YZB8vWxNE I1mieUbZw4zbDyjJ+v5VWAxcPkmRuoIt2iWEDNLUgQGCzET4YAya94sLlt3j4M7r2vON Hxi+UIVVz+lg4XspePRSm1/BYrwMPmske0NPkhyzbrZ9f8nHDFgAmC9vaWIFzMuzJi6x cM1Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=7A/idN5i7KY3z4k4fgkcXPn+jlJrCINlNQB76MW1G6g=; fh=GK5CjDMaVQPHOBlggPpPhI+/EVGCw7KIM9L2vib/vfs=; b=Ls5VdfrY/SILuYqrT9R7JipiYb32DTMCtVQbMSBNkzslo7Plz5ucV1muCSHjH8vQhE xdTIHSvT+103ZF8LAhKTUG6aAu7eOb9wkpcHVrZPhmwFRkenqPqXnbG40u7ofx4W7rPr dRK2nkNzdc+2KC/Ik4Xn+QSt/DLM5NRGOuQ57df6KBOA5lrB2IaNO8BcM2QvBv675M3U UIJrZ7PGg1cXMs9gB/+ZagPpAr11Ticv2pUR49lQyE4/Dbr4VZdJQ4n2fh/IKAvjoPgg LeMy6EwtENC1yPzqH5BiucdhsKcjHfBmPIHqQ/0Z6N87ORJ6xgP0ab/0Wsy4ow/0edN1 1eNg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oTLCc5KR; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1726221423; x=1726826223; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=7A/idN5i7KY3z4k4fgkcXPn+jlJrCINlNQB76MW1G6g=; b=MvyWMCN3/Wpb/xzJukscqnYHQjwI7P+L+E4hYEg4V3P685u7KwpLBLPirxEBxr6Y1b WjLZtyNv1keVMm8cFY+o9NKEJF4e+K0Cvj8NHf37vh98rdPf0Kg+5zFlcW28MeOlCuDb axGeigSm8pPxXSzZs2rie3wN39d4rbWNfgglA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726221423; x=1726826223; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=7A/idN5i7KY3z4k4fgkcXPn+jlJrCINlNQB76MW1G6g=; b=kfggZYCCSPO+n8gRaQzVGpHVbdvjyz9VUPuwMBO9edG/ofW+9u9Nqm2bl8Ofkh5DOi vKQ95m8s22NfSLZWaq7gYOQjZq9aJDwDSFp+DhWKoizoAadzE9aNytWHHdbJMg1vj2X6 6FovVjADWpep6xLXdJJCNtNi9mgU2rqmZg2T10ybYNIqE4ncuzw3aNQYNIawIUlFQ5+1 d7+KZZh+qs+HHbmpQoClvK9i7ZJ+XFOjp/jUAcE9htVddHV7xXlOBDsblEZbSFDIlXxS aUN+aOpLqp4l5KsYqcQiFiIQm7vkC/qeF0YDmnuz5DLv2GsSAh7vFsIc5GTEMB1f2tdd F7cQ== X-Forwarded-Encrypted: i=2; AJvYcCW/SHOnvqt5WsRWIGrImqYFvuFzNwSAnXEq51jJPgLXsClMCUaGr4P/G5I0n7x7wf48lqU6HOKTDy+hO8fM@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxcuGLzZ3JPkTDq+1XugeZ6gp8DRYThecF6l9ULF/BZxSeguPlL IH46VNLjW4hzYT31k8LEB1rElx3Y6+AZmV27QPoT6aK06qyI6id7vP4nkV4use1acg== X-Google-Smtp-Source: AGHT+IFGSeKESRUs9Eg25aHYGuVRn9i2Nfy2F+9nSw8edRHRk0kL301A43o1j+26QjLkZ9K+RvxbVg== X-Received: by 2002:a05:6402:1955:b0:5c3:ce08:58f1 with SMTP id 4fb4d7f45d1cf-5c413e36a2bmr4051236a12.20.1726221422362; Fri, 13 Sep 2024 02:57:02 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6402:34cc:b0:5c3:cb56:e69b with SMTP id 4fb4d7f45d1cf-5c413e25ee8ls80156a12.0.-pod-prod-02-eu; Fri, 13 Sep 2024 02:57:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUMUoO4h1yPqT2SG14IYoEF71UwLwquG4Gr6gvK7XnmB3+4sbGBZRhZ1Qt5HxWRtV0hghlLAzcB/ZEvKOEK@amarulasolutions.com X-Received: by 2002:a17:907:e2a5:b0:a8a:926a:d012 with SMTP id a640c23a62f3a-a9029490673mr540259966b.26.1726221420642; Fri, 13 Sep 2024 02:57:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726221420; cv=none; d=google.com; s=arc-20160816; b=Yy5Ewft4hjEQVKi3giVjdpodBOMUqgXXXon541EzSNkkK7E04pyIgpFz0uzQ/u54mG P0smEd653h/R6lBpCCm+zcsT14+pLhRUaDNkxeMkCpQhsHxkEegMmHf0a1tIh/2LBwlj /zVncvmjUOlQ9u/ubDPXsiOK+pdu1x/HfVCy163u8AHYoCLBoClIG1xfSCRfYPxOhH3x fTTCS36ZRZCEK1JETO+n99hyuqjb+GXdWLJTN3fW6sbDFzBFbou6l3/F63g1Pf19d1g8 jNQJs0pCvBlFjGkPuXlXIRlzS1YfoRHaDvcSzZalmPAUx0EaKTJpu/BzA3GBWuMsgKwL geXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=swiTdlXpxz7ztsvlYK79VGvCm12s6t/1zlzaJmhbPu8=; fh=pe0P8zGbzRSfQ7zbVzTDMvhnW8ebxoktj3cOw0l2x2o=; b=rjfxlJh484HrE4YrJg6yp8fhzsxggPpuokiv9pX36ihdtwkI7+0TRlNdDHSWx1eNPy ZYD6l13csk6T2RKpur4GL9ltkpcFkecorXBFT9hwnOfGlg3Jx8iNNmct4lkHlr3Un0dG DV0XUtulX2sc6V9ZTRUKHtUlpuksIibkZW+1V/i5e28JyofmX6PG7NfcM4slpReVdAXW m9Q0FlT9T5ia5M665JMTUmAuahBApD2vxETFdk5zDilwAnlcaypCE94nSSzrT1PhnqZf wcrJ311FC2oLzNSeEN6PolviOvtL4Y5WsKV1/m8mN+e0oVXnvsmMmkPT3NpLLR9rEfen oVFQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oTLCc5KR; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id a640c23a62f3a-a8d25cc6aa4sor403363466b.18.2024.09.13.02.57.00 for (Google Transport Security); Fri, 13 Sep 2024 02:57:00 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCWWb17GAuf6gl1n5njsXj9KLjLfslAVWkzBVPOi/hxu3maOYYP4RFf67embOnlKd+QHzA76b7Zm0lstQbKW@amarulasolutions.com X-Received: by 2002:a17:907:940e:b0:a8d:2ab2:c9b1 with SMTP id a640c23a62f3a-a90296716efmr520301166b.56.1726221419343; Fri, 13 Sep 2024 02:56:59 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-87-4-102-18.retail.telecomitalia.it. [87.4.102.18]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8d25cee72bsm863224766b.173.2024.09.13.02.56.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Sep 2024 02:56:59 -0700 (PDT) From: Dario Binacchi To: u-boot@lists.denx.de Cc: Fabio Estevam , linux-amarula@amarulasolutions.com, michael@amarulasolutions.com, Miquel Raynal , Dario Binacchi , AKASHI Takahiro , Alexander Dahl , Anatolij Gustschin , Andrzej Hajda , Anton Bambura , Ashok Reddy Soma , Devarsh Thakkar , Eugen Hristev , Fabio Estevam , Heinrich Schuchardt , Hou Zhiqiang , Igor Prusov , Igor Prusov , Jaehoon Chung , Jan Kiszka , Joe Hershberger , =?utf-8?q?Jonas_Schw=C3=B6bel?= , Julien Masson , Liu Ying , Lukasz Majewski , Maksim Kiselev , Marcel Ziswiler , Marco Felsch , Marek Vasut , Marek Vasut , Martyn Welch , Mattijs Korpershoek , Minkyu Kang , "NXP i.MX U-Boot Team" , Neil Armstrong , Nicolas Heemeryck , Nikhil M Jain , Patrick Barsanti , Peng Fan , Peter Robinson , Sakari Ailus , Sam Protsenko , Sean Anderson , Simon Glass , Stefan Bosch , Stefano Babic , Svyatoslav Ryhel , =?utf-8?q?S=C3=A9bastien_Szymanski?= , Tim Harvey , Tom Rini , Vinod Koul , Yang Xiwen , Ye Li , u-boot-amlogic@groups.io Subject: [PATCH 00/26] Support display (and even more) on the BSH SMM S2/PRO boards Date: Fri, 13 Sep 2024 11:55:42 +0200 Message-ID: <20240913095622.72377-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oTLCc5KR; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This series was created out of the need to supportsimple-framebuffer for BSH boards SMM_S2 and SMM_S2PRO. To achieve this goal, it was necessary to develop additional code and/or drivers for all the required components (i. e. clock, power domain, video, etc.). This series has a Linux counterpart that will also be submitted upstream as soon as possible. Furthermore, given the overlap in topics with the recent series [1], we are open to collaborate on the common parts to ensure proper development. [1] https://lore.kernel.org/all/20240910101344.110633-1-miquel.raynal@bootlin.com/T/#mb7cd440abc6fcc0de205f577eb3225e1c1c76823 Dario Binacchi (6): boot: fdt_simplefb: add a debug message video: mxsfb: support simple frame-buffer video: bridge: samsung: support simple frame-buffer imx8mn_bsh_smm_s2/pro: support simple frame-buffer imx8mn_bsh_smm_s2/pro: enable simple frame-buffer imx8mn_bsh_smm_s2/pro: add splash screen with BSH logo Michael Trimarchi (20): clk: Propagate clk_set_rate() if CLK_SET_PARENT_RATE present for gate and mux clk: imx8mn: Prevent clock critical path from disabling during reparent and set_rate clk: imx8mm: Prevent clock critical path from disabling during reparent and set_rate clk: clk-uclass: Implement CLK_OPS_PARENT_ENABLE clk: imx8mm: Mark IMX8MM_SYS_PLL2 and IMX8MM_SYS_PLL3 as enabled clk: imx8mn: Mark IMX8MN_SYS_PLL2 and IMX8MN_SYS_PLL3 as enabled clk: imx8mn: add video clocks support power: Add iMX8M block ctrl driver for dispmix video: Add video link framework video: bridge: Add check_timing interface video: dsi_host: add disable host interface video: Update mxsfb video drivers for iMX8MM/iMX8MN display video: Enable DM_UC_FLAG_SEQ_ALIAS for display and bridge phy: dphy: add support to calculate the timing based on hs_clk_rate phy: dphy: Correct lpx parameter and its derivatives(ta_{get,go,sure}) phy: dphy: Correct clk_pre parameter lib: div64: sync with Linux video: bridge: Add Samsung DSIM bridge video: Add Synaptics R63353 panel driver imx8mn_bsh_smm_s2/pro: Enable display on reference design .../dts/imx8mn-bsh-smm-s2-u-boot-common.dtsi | 23 + board/bsh/imx8mn_smm_s2/imx8mn_smm_s2.c | 99 ++ boot/fdt_simplefb.c | 2 + common/stdio.c | 4 + configs/imx8mn_bsh_smm_s2_defconfig | 21 + configs/imx8mn_bsh_smm_s2pro_defconfig | 21 + drivers/clk/clk-gate.c | 1 + drivers/clk/clk-mux.c | 2 +- drivers/clk/clk-uclass.c | 67 +- drivers/clk/clk.c | 9 + drivers/clk/imx/clk-imx8mm.c | 73 +- drivers/clk/imx/clk-imx8mn.c | 131 +- drivers/phy/meson-axg-mipi-dphy.c | 2 +- drivers/phy/phy-core-mipi-dphy.c | 36 +- drivers/power/domain/Kconfig | 6 + drivers/power/domain/Makefile | 1 + drivers/power/domain/imx8m-blk-ctrl.c | 438 +++++ drivers/power/domain/imx8m-power-domain.c | 213 ++- drivers/video/Kconfig | 14 + drivers/video/Makefile | 2 + drivers/video/bridge/Kconfig | 13 + drivers/video/bridge/Makefile | 1 + drivers/video/bridge/samsung-dsi-host.c | 1576 +++++++++++++++++ drivers/video/bridge/samsung-dsim.c | 151 ++ drivers/video/bridge/samsung-dsim.h | 20 + drivers/video/bridge/video-bridge-uclass.c | 11 + drivers/video/display-uclass.c | 1 + drivers/video/dsi-host-uclass.c | 10 + drivers/video/mxsfb.c | 144 +- drivers/video/synaptics-r63353.c | 228 +++ drivers/video/video_link.c | 529 ++++++ include/clk.h | 9 + include/configs/imx8mn_bsh_smm_s2.h | 1 + include/configs/imx8mn_bsh_smm_s2_common.h | 4 + include/configs/imx8mn_bsh_smm_s2pro.h | 1 + include/dsi_host.h | 8 + include/linux/clk-provider.h | 1 + include/linux/math64.h | 110 ++ include/phy-mipi-dphy.h | 3 + include/video_bridge.h | 20 + include/video_link.h | 19 + tools/logos/bsh.bmp | Bin 0 -> 10644 bytes 42 files changed, 3942 insertions(+), 83 deletions(-) create mode 100644 drivers/power/domain/imx8m-blk-ctrl.c create mode 100644 drivers/video/bridge/samsung-dsi-host.c create mode 100644 drivers/video/bridge/samsung-dsim.c create mode 100644 drivers/video/bridge/samsung-dsim.h create mode 100644 drivers/video/synaptics-r63353.c create mode 100644 drivers/video/video_link.c create mode 100644 include/video_link.h create mode 100644 tools/logos/bsh.bmp