[PATCH 6/6] clk: ingenic: Add support for the JZ4760

2021-03-07 Thread Paul Cercueil
Add the CGU code and the compatible string to the TCU driver to support the JZ4760 SoC. Signed-off-by: Paul Cercueil --- drivers/clk/ingenic/Kconfig| 10 + drivers/clk/ingenic/Makefile | 1 + drivers/clk/ingenic/jz4760-cgu.c | 433

[PATCH 5/6] clk: ingenic: Support overriding PLLs M/N/OD calc algorithm

2021-03-07 Thread Paul Cercueil
SoC-specific code can now provide a callback if they need to compute the M/N/OD values in a specific way. Signed-off-by: Paul Cercueil --- drivers/clk/ingenic/cgu.c | 40 ++- drivers/clk/ingenic/cgu.h | 3 +++ 2 files changed, 30 insertions(+), 13 deletions

[PATCH 3/6] clk: ingenic: Read bypass register only when there is one

2021-03-07 Thread Paul Cercueil
Rework the clock code so that the bypass register is only read when there is actually a bypass functionality. Signed-off-by: Paul Cercueil --- drivers/clk/ingenic/cgu.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/clk/ingenic/cgu.c b/drivers

[PATCH 4/6] clk: ingenic: Remove pll_info.no_bypass_bit

2021-03-07 Thread Paul Cercueil
We can express that a PLL has no bypass bit by simply setting the .bypass_bit field to a negative value. Signed-off-by: Paul Cercueil --- drivers/clk/ingenic/cgu.c| 4 ++-- drivers/clk/ingenic/cgu.h| 7 +++ drivers/clk/ingenic/jz4770-cgu.c | 3 +-- 3 files changed, 6

[PATCH 2/6] clk: Support bypassing dividers

2021-03-07 Thread Paul Cercueil
. This could be solved by creating two clocks, one with CGU_CLK_DIV and one with CGU_CLK_MUX, but that would increase the number of clocks. Instead, add a 8-bit mask to CGU_CLK_DIV clocks. If the bit corresponding to the parent clock's index is set, the divider is bypassed. Signed-off-by: Paul

[PATCH 1/6] dt-bindings: clock: ingenic: Add ingenic,jz4760{,b}-cgu compatibles

2021-03-07 Thread Paul Cercueil
Add ingenic,jz4760-cgu and ingenic,jz4760b-cgu compatible strings for the JZ4760 and JZ4760B SoCs respectively. Signed-off-by: Paul Cercueil --- Documentation/devicetree/bindings/clock/ingenic,cgu.yaml | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings

[PATCH 0/6] clk: Ingenic JZ4760(B) support

2021-03-07 Thread Paul Cercueil
tell me if it works for you. Cheers, -Paul Paul Cercueil (6): dt-bindings: clock: ingenic: Add ingenic,jz4760{,b}-cgu compatibles clk: Support bypassing dividers clk: ingenic: Read bypass register only when there is one clk: ingenic: Remove pll_info.no_bypass_bit clk: ingenic: Support

[PATCH] clk: Fix doc of clk_get_parent

2021-03-07 Thread Paul Cercueil
On error, or when the passed parameter is NULL, the return value is NULL and not a PTR_ERR()-encoded value. Signed-off-by: Paul Cercueil --- include/linux/clk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/clk.h b/include/linux/clk.h index 266e8de3cb51

[PATCH 3/3] net: davicom: Use platform_get_irq_optional()

2021-03-07 Thread Paul Cercueil
The second IRQ line really is optional, so use platform_get_irq_optional() to obtain it. Signed-off-by: Paul Cercueil --- drivers/net/ethernet/davicom/dm9000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet

[PATCH 2/3] net: davicom: Fix regulator not turned off on driver removal

2021-03-07 Thread Paul Cercueil
We must disable the regulator that was enabled in the probe function. Fixes: 7994fe55a4a2 ("dm9000: Add regulator and reset support to dm9000") Signed-off-by: Paul Cercueil --- drivers/net/ethernet/davicom/dm9000.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-)

[PATCH 1/3] net: davicom: Fix regulator not turned off on failed probe

2021-03-07 Thread Paul Cercueil
When the probe fails or requests to be defered, we must disable the regulator that was previously enabled. Fixes: 7994fe55a4a2 ("dm9000: Add regulator and reset support to dm9000") Signed-off-by: Paul Cercueil --- drivers/net/ethernet/davicom/dm9000.c | 12 +--- 1 file

Re: [PATCH 3/3] input: gpio-keys: Use hrtimer for software debounce

2021-03-05 Thread Paul Cercueil
Hi Dmitry, Le ven. 5 mars 2021 à 10:35, Dmitry Torokhov a écrit : Hi Paul, On Fri, Mar 05, 2021 at 05:01:11PM +, Paul Cercueil wrote: -static void gpio_keys_gpio_work_func(struct work_struct *work) +static enum hrtimer_restart gpio_keys_debounce_timer(struct hrtimer *t

[PATCH 1/3] input: gpio-keys: Remove extra call to input_sync

2021-03-05 Thread Paul Cercueil
The input_sync() function will already be called within gpio_keys_gpio_report_event(), so there's no need to call it again after the loop in gpio_keys_report_state(). Signed-off-by: Paul Cercueil --- drivers/input/keyboard/gpio_keys.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers

[PATCH 2/3] input: gpio-keys: Use hrtimer for release timer

2021-03-05 Thread Paul Cercueil
of the standard timer to address this issue. Note that by using a hard IRQ for the hrtimer callback, we can get rid of the spin_lock_irqsave() and spin_unlock_irqrestore(). Signed-off-by: Paul Cercueil --- drivers/input/keyboard/gpio_keys.c | 27 --- 1 file changed, 16

[PATCH 3/3] input: gpio-keys: Use hrtimer for software debounce

2021-03-05 Thread Paul Cercueil
key is quickly pressed then released (on a human's time scale). Switching to hrtimers fixes this issue, and will work even on extremely low HZ values (tested at HZ=24). Signed-off-by: Paul Cercueil --- drivers/input/keyboard/gpio_keys.c | 33 +++--- 1 file changed,

[PATCH] MIPS: boot/compressed: Copy DTB to aligned address

2021-03-03 Thread Paul Cercueil
: c4d5e638d6e9 ("scripts/dtc: Update to upstream version v1.6.0-51-g183df9e9c2b9") Signed-off-by: Paul Cercueil --- arch/mips/boot/compressed/decompress.c | 8 arch/mips/kernel/vmlinux.lds.S | 2 ++ 2 files changed, 10 insertions(+) diff --git a/arch/mips/boot/compressed/decompress

Re: [PATCH] MIPS: boot/compressed: Copy DTB to aligned address

2021-03-03 Thread Paul Cercueil
Hi Rob, Le mer. 3 mars 2021 à 14:37, Rob Herring a écrit : On Wed, Mar 3, 2021 at 1:33 PM Paul Cercueil wrote: Since 5.12-rc1, the Device Tree blob must now be properly aligned. I had checked the other built-in cases as microblaze broke too, but missed some of the many ways MIPS can have

[PATCH 1/2] dt-bindings: media: Document RDA5807 FM radio bindings

2021-03-02 Thread Paul Cercueil
Add documentation for the devicetree bindings of the RDA5807 FM radio I2C chip from Unisoc. Signed-off-by: Paul Cercueil --- .../bindings/media/i2c/rda,rda5807.yaml | 67 +++ 1 file changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/i2c

[PATCH 2/2] media: radio: RDA5807: Added driver

2021-03-02 Thread Paul Cercueil
From: Maarten ter Huurne Add a driver to support the RDA5807 FM radio I2C chip from Unisoc Communications. Tested and working with fmtools 2.x. Signed-off-by: Maarten ter Huurne Signed-off-by: Paul Cercueil --- drivers/media/radio/Kconfig | 12 + drivers/media/radio/Makefile

Re: [PATCH v2] ASoC: codec: Omit superfluous error message in jz4760_codec_probe()

2021-03-02 Thread Paul Cercueil
Le mar. 2 mars 2021 à 21:56, Tang Bin a écrit : The function devm_platform_ioremap_resource has already contained error message, so remove the redundant dev_err here. Signed-off-by: Tang Bin Acked-by: Paul Cercueil Thanks! Cheers, -Paul --- Changes from v1 - to streamline the code

Re: [PATCH] ASoC: codec: Omit superfluous error message in jz4760_codec_probe()

2021-03-02 Thread Paul Cercueil
Hi Tang, Le mar. 2 mars 2021 à 20:11, Tang Bin a écrit : The function devm_platform_ioremap_resource has already contained error message, so remove the redundant dev_err here. Signed-off-by: Tang Bin --- sound/soc/codecs/jz4760.c | 1 - 1 file changed, 1 deletion(-) diff --git

Re: [PATCH v2] pinctrl: ingenic: add missing call to of_node_put()

2021-02-26 Thread Paul Cercueil
"for_each_child_of_node" should have of_node_put() before return around line 2489. Reported-by: Abaci Robot Signed-off-by: Yang Li Acked-by: Paul Cercueil Cheers, -Paul --- Changes in v2: -add braces for if drivers/pinctrl/pinctrl-ingenic.c | 4 +++- 1 file changed, 3 insertions(+),

Re: [PATCH v3 0/4] Fixes to bridge/panel and ingenic-drm

2021-02-24 Thread Paul Cercueil
Hi, Some feedback for patches 1-3? Laurent? Cheers, -Paul Le dim. 24 janv. 2021 à 8:55, Paul Cercueil a écrit : Hi, Here are three independent fixes. The first one addresses a use-after-free in bridge/panel.c; the second one addresses a use-after-free in the ingenic-drm driver; finally

[PATCH] perf stat: Use nftw() instead of ftw()

2021-02-08 Thread Paul Cercueil
ftw() has been obsolete for about 12 years now. Fixes: bb1c15b60b98 ("perf stat: Support regex pattern in --for-each-cgroup") CC: sta...@vger.kernel.org Signed-off-by: Paul Cercueil --- Notes: NOTE: Not runtime-tested, I have no idea what I need to do in perf to test this. Bu

Re: [BACKPORT 5.4 PATCH] pinctrl: ingenic: Fix JZ4760 support

2021-01-24 Thread Paul Cercueil
Le dim. 24 janv. 2021 à 13:47, Paul Cercueil a écrit : - JZ4760 and JZ4760B have a similar register layout as the JZ4740, and don't use the new register layout, which was introduced with the JZ4770 SoC and not the JZ4760 or JZ4760B SoCs. - The JZ4740 code path only expected two

[BACKPORT 5.4 PATCH] pinctrl: ingenic: Fix JZ4760 support

2021-01-24 Thread Paul Cercueil
with more than two. Fix it for the JZ4760, which has four configurable function modes. Fixes: 0257595a5cf4 ("pinctrl: Ingenic: Add pinctrl driver for JZ4760 and JZ4760B.") Cc: # 5.3 Signed-off-by: Paul Cercueil --- drivers/pinctrl/pinctrl-ingenic.c | 24 1 fi

Re: [PATCH v3 4/4] drm/ingenic: Fix non-OSD mode

2021-01-24 Thread Paul Cercueil
can officially post it. [1] https://github.com/goldelico/letux-kernel/commit/3be1de5fdabf2cc1c17f198ded3328cc6e4b9844 Am 24.01.2021 um 09:55 schrieb Paul Cercueil : Even though the JZ4740 did not have the OSD mode, it had (according to the documentation) two DMA channels, but there is absolut

Re: [RE-RESEND PATCH 1/4] usb: musb: Fix runtime PM race in musb_queue_resume_work

2021-01-24 Thread Paul Cercueil
Hi Sergei, Le sam. 23 janv. 2021 à 19:41, Sergei Shtylyov a écrit : On 1/23/21 5:24 PM, Paul Cercueil wrote: musb_queue_resume_work() would call the provided callback if the runtime PM status was 'active'. Otherwise, it would enqueue the request if the hardware was still suspended

[PATCH v3 4/4] drm/ingenic: Fix non-OSD mode

2021-01-24 Thread Paul Cercueil
to the DMA0 channel) as the primary plane, instead of the foreground1 plane, which is the primary plane when in OSD mode. Fixes: 3c9bea4ef32b ("drm/ingenic: Add support for OSD mode") Cc: # v5.8+ Signed-off-by: Paul Cercueil Acked-by: Daniel Vetter --- drivers/gpu/drm/ingenic/ingenic-drm-

[PATCH v3 3/4] drm/ingenic: Register devm action to cleanup encoders

2021-01-24 Thread Paul Cercueil
: Use the new drmm_plain_simple_encoder_alloc() macro Fixes: c369cb27c267 ("drm/ingenic: Support multiple panels/bridges") Cc: # 5.8+ Signed-off-by: Paul Cercueil --- Notes: Use the V1 of this patch to fix v5.11 and older kernels. This V3 only applies on the current drm-misc-n

[PATCH v3 2/4] drm/simple_kms_helper: Add macro drmm_plain_simple_encoder_alloc()

2021-01-24 Thread Paul Cercueil
This performs the same operation as drmm_simple_encoder_alloc(), but only allocates and returns a struct drm_encoder instance. Signed-off-by: Paul Cercueil --- include/drm/drm_simple_kms_helper.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/drm

[PATCH v3 1/4] drm: bridge/panel: Cleanup connector on bridge detach

2021-01-24 Thread Paul Cercueil
c: # 4.12+ Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Signed-off-by: Paul Cercueil --- drivers/gpu/drm/bridge/panel.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/brid

[PATCH v3 0/4] Fixes to bridge/panel and ingenic-drm

2021-01-24 Thread Paul Cercueil
, to fix it for v5.11 and older kernels, use the V1 of that patch. Cheers, -Paul Paul Cercueil (4): drm: bridge/panel: Cleanup connector on bridge detach drm/simple_kms_helper: Add macro drmm_plain_simple_encoder_alloc() drm/ingenic: Register devm action to cleanup encoders drm/ingenic: Fix

Re: [PATCH] PHY: Ingenic: compile phy-ingenic-usb only if it was enabled

2021-01-24 Thread Paul Cercueil
Hi, thank you for your patch. Le sam. 23 janv. 2021 à 23:01, Qiujun Huang a écrit : We should compile this driver only if we opened PHY_INGENIC_USB. 'opened' -> 'enable'. Signed-off-by: Qiujun Huang You will need to add a Fixes: tag and Cc linux-stable, since the problem is already

[PATCH] remoteproc: ingenic: Add module parameter 'auto_boot'

2021-01-23 Thread Paul Cercueil
Add a 'auto_boot' module parameter that instructs the remoteproc driver whether or not it should auto-boot the remote processor, which will default to "false", since the VPU in Ingenic SoCs does not really have any predetermined function. Signed-off-by: Paul Cercueil --- drivers/

[RE-RESEND PATCH 4/4] usb: musb: jz4740: Add missing CR to error strings

2021-01-23 Thread Paul Cercueil
If you pass a string that is not terminated with a carriage return to dev_err(), it will eventually be printed with a carriage return, but not right away, since the kernel will wait for a pr_cont(). Signed-off-by: Paul Cercueil --- drivers/usb/musb/jz4740.c | 18 +- 1 file

[RE-RESEND PATCH 3/4] usb: musb: dma: Remove unused variable

2021-01-23 Thread Paul Cercueil
Remove unused-but-set devctl variable. Signed-off-by: Paul Cercueil --- drivers/usb/musb/musbhsdma.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/usb/musb/musbhsdma.c b/drivers/usb/musb/musbhsdma.c index 0aacfc8be5a1..7acd1635850d 100644 --- a/drivers/usb/musb/musbhsdma.c

[RE-RESEND PATCH 2/4] usb: musb: Fix NULL check on struct musb_request field

2021-01-23 Thread Paul Cercueil
-check on the 'req' pointer instead. Signed-off-by: Paul Cercueil Suggested-by: Maarten ter Huurne Acked-by: Tony Lindgren --- drivers/usb/musb/musb_gadget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index

[RE-RESEND PATCH 1/4] usb: musb: Fix runtime PM race in musb_queue_resume_work

2021-01-23 Thread Paul Cercueil
r hdrc glue") Cc: sta...@vger.kernel.org # v4.9+ Signed-off-by: Paul Cercueil Reviewed-by: Tony Lindgren Tested-by: Tony Lindgren --- drivers/usb/musb/musb_core.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/drivers/usb/musb/musb_core

[PATCH v2 2/2] phy: ingenic: Add support for the JZ4760(B)

2021-01-23 Thread Paul Cercueil
Add support for the JZ4760 and JZ4760B SoCs, which behave exactly as the (newer) JZ4770 SoC. Signed-off-by: Paul Cercueil --- Notes: v2: No change drivers/phy/ingenic/phy-ingenic-usb.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/phy/ingenic/phy

[PATCH v2 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs

2021-01-23 Thread Paul Cercueil
Add the ingenic,jz4760-phy and ingenic,jz4760b-phy compatible strings, and make the ingenic,jz4770-phy compatible string require ingenic,jz4760-phy as a fallback, since both work the same, and the JZ4760 SoC is older. Signed-off-by: Paul Cercueil --- Notes: v2: Fix indentation

[PATCH 2/3] ASoC: codec/ingenic: Depend on MACH_INGENIC

2021-01-23 Thread Paul Cercueil
No need to show the options to build Ingenic-specific drivers on all MIPS kernel configurations if Ingenic SoCs support is not enabled. Signed-off-by: Paul Cercueil --- sound/soc/codecs/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/Kconfig b

[PATCH 3/3] ASoC: codec: Add driver for JZ4760 internal codec

2021-01-23 Thread Paul Cercueil
From: Christophe Branchereau Add support for the internal codec found in the JZ4760 SoC from Ingenic. Signed-off-by: Christophe Branchereau Signed-off-by: Paul Cercueil --- sound/soc/codecs/Kconfig | 13 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/jz4760.c | 889

[PATCH 1/3] dt-bindings: sound/ingenic: Add compatible strings for JZ4760(B) SoC

2021-01-23 Thread Paul Cercueil
Add the ingenic,jz4760b-codec and ingenic,jz4760-codec compatible strings. In the process, convert the previous compatible strings to use an enum instead. Signed-off-by: Paul Cercueil --- .../devicetree/bindings/sound/ingenic,codec.yaml | 11 --- 1 file changed, 8 insertions(+), 3

Re: [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs

2021-01-22 Thread Paul Cercueil
Hi Rob, Le ven. 22 janv. 2021 à 8:35, Rob Herring a écrit : On Wed, Jan 20, 2021 at 5:59 AM Paul Cercueil wrote: Add the ingenic,jz4760-phy and ingenic,jz4760b-phy compatible strings, and make the ingenic,jz4770-phy compatible string require ingenic,jz4760-phy as a fallback, since

Re: [PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs

2021-01-21 Thread Paul Cercueil
Hi Rob, Le jeu. 21 janv. 2021 à 10:01, Rob Herring a écrit : On Wed, 20 Jan 2021 11:59:44 +, Paul Cercueil wrote: Add the ingenic,jz4760-phy and ingenic,jz4760b-phy compatible strings, and make the ingenic,jz4770-phy compatible string require ingenic,jz4760-phy as a fallback, since

Re: [PATCH v2 1/3] drm: bridge/panel: Cleanup connector on bridge detach

2021-01-20 Thread Paul Cercueil
Le mer. 20 janv. 2021 à 17:03, Daniel Vetter a écrit : On Wed, Jan 20, 2021 at 1:35 PM Paul Cercueil wrote: If we don't call drm_connector_cleanup() manually in panel_bridge_detach(), the connector will be cleaned up with the other DRM objects in the call to drm_mode_config_cleanup

Re: [PATCH v2 2/3] drm/ingenic: Register devm action to cleanup encoders

2021-01-20 Thread Paul Cercueil
Le mer. 20 janv. 2021 à 15:04, Daniel Vetter a écrit : On Wed, Jan 20, 2021 at 2:21 PM Paul Cercueil wrote: Le mer. 20 janv. 2021 à 14:01, Daniel Vetter a écrit : > On Wed, Jan 20, 2021 at 1:36 PM Paul Cercueil > wrote: >> >> Since the encoders have b

[PATCH v2 0/3] Fixes to bridge/panel and ingenic-drm

2021-01-20 Thread Paul Cercueil
of that patch. Cheers, -Paul Paul Cercueil (3): drm: bridge/panel: Cleanup connector on bridge detach drm/ingenic: Register devm action to cleanup encoders drm/ingenic: Fix non-OSD mode drivers/gpu/drm/bridge/panel.c| 6 + drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 27

Re: [PATCH v2 2/3] drm/ingenic: Register devm action to cleanup encoders

2021-01-20 Thread Paul Cercueil
Le mer. 20 janv. 2021 à 14:01, Daniel Vetter a écrit : On Wed, Jan 20, 2021 at 1:36 PM Paul Cercueil wrote: Since the encoders have been devm-allocated, they will be freed way before drm_mode_config_cleanup() is called. To avoid use-after-free conditions, we then must ensure

Re: [PATCH] pinctrl: ingenic: Improve JZ4760 support

2021-01-20 Thread Paul Cercueil
Le mer. 20 janv. 2021 à 14:13, H. Nikolaus Schaller a écrit : Am 20.01.2021 um 12:07 schrieb Paul Cercueil : - Add otg function and otg-vbus group. - Add lcd-8bit, lcd-16bit, lcd-18bit, lcd-generic and lcd-special groups. Change the lcd-24bit group so that it only selects the pins

[PATCH v2 1/3] drm: bridge/panel: Cleanup connector on bridge detach

2021-01-20 Thread Paul Cercueil
c: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Signed-off-by: Paul Cercueil --- drivers/gpu/drm/bridge/panel.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c index 0d

[PATCH v2 3/3] drm/ingenic: Fix non-OSD mode

2021-01-20 Thread Paul Cercueil
to the DMA0 channel) as the primary plane, instead of the foreground1 plane, which is the primary plane when in OSD mode. Fixes: 3c9bea4ef32b ("drm/ingenic: Add support for OSD mode") Cc: # v5.8+ Signed-off-by: Paul Cercueil --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 11 +++ 1 file

[PATCH v2 2/3] drm/ingenic: Register devm action to cleanup encoders

2021-01-20 Thread Paul Cercueil
: c369cb27c267 ("drm/ingenic: Support multiple panels/bridges") Cc: # 5.8+ Signed-off-by: Paul Cercueil --- Notes: Use the V1 of this patch to fix v5.11 and older kernels. This V2 only applies on the current drm-misc-next branch. drivers/gpu/drm/ingenic/ingenic-drm-

[PATCH 2/2] phy: ingenic: Add support for the JZ4760

2021-01-20 Thread Paul Cercueil
Add support for the JZ4760 SoC, which behave exactly as the (newer) JZ4770 SoC. Signed-off-by: Paul Cercueil --- drivers/phy/ingenic/phy-ingenic-usb.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/phy/ingenic/phy-ingenic-usb.c b/drivers/phy/ingenic/phy

[PATCH 1/2] dt-bindings/phy: ingenic: Add compatibles for JZ4760(B) SoCs

2021-01-20 Thread Paul Cercueil
Add the ingenic,jz4760-phy and ingenic,jz4760b-phy compatible strings, and make the ingenic,jz4770-phy compatible string require ingenic,jz4760-phy as a fallback, since both work the same, and the JZ4760 SoC is older. Signed-off-by: Paul Cercueil --- .../bindings/phy/ingenic,phy-usb.yaml

[PATCH] pinctrl: ingenic: Improve JZ4760 support

2021-01-20 Thread Paul Cercueil
there for any JZ4760 based board, yet). Remove the lcd-no-pins group which is just useless. Signed-off-by: Paul Cercueil --- drivers/pinctrl/pinctrl-ingenic.c | 38 +++ 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/drivers/pinctrl/pinctrl-ingenic.c b

[PATCH 2/2] dma: jz4780: Add support for the JZ4760(B)

2021-01-20 Thread Paul Cercueil
Add support for the JZ4760 and JZ4760B SoCs. Both SoCs have only 5 DMA channels per chip. The JZ4760B introduced the DCKES/DCKEC registers. Signed-off-by: Paul Cercueil --- drivers/dma/dma-jz4780.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/dma/dma-jz4780.c b

[PATCH 1/2] dt-bindings: dma: ingenic: Add compatible strings for JZ4760(B) SoCs

2021-01-20 Thread Paul Cercueil
Add ingenic,jz4760-dma and ingenic,jz4760b-dma compatible strings to support the DMA engines present in the JZ4760 and JZ4760B SoCs. Signed-off-by: Paul Cercueil --- Documentation/devicetree/bindings/dma/ingenic,dma.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation

Re: [PATCH 2/3] drm/ingenic: Register devm action to cleanup encoders

2021-01-18 Thread Paul Cercueil
Hi Laurent, Le lun. 18 janv. 2021 à 11:43, Laurent Pinchart a écrit : Hi Paul, Thank you for the patch. On Sun, Jan 17, 2021 at 11:26:45AM +, Paul Cercueil wrote: Since the encoders have been devm-allocated, they will be freed way before drm_mode_config_cleanup() is called. To avoid

[PATCH 3/3] drm/ingenic: Fix non-OSD mode

2021-01-17 Thread Paul Cercueil
to the DMA0 channel) as the primary plane, instead of the foreground1 plane, which is the primary plane when in OSD mode. Fixes: 3c9bea4ef32b ("drm/ingenic: Add support for OSD mode") Cc: # v5.8+ Signed-off-by: Paul Cercueil --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 11 +++ 1 file

[PATCH 1/3] drm: bridge/panel: Cleanup connector on bridge detach

2021-01-17 Thread Paul Cercueil
t Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Signed-off-by: Paul Cercueil --- drivers/gpu/drm/bridge/panel.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c index 0ddc37551194..975d65c14c9c 100644 --- a/drivers/gpu/

[PATCH 2/3] drm/ingenic: Register devm action to cleanup encoders

2021-01-17 Thread Paul Cercueil
anels/bridges") Cc: # 5.8+ Signed-off-by: Paul Cercueil --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c index 368bfef8b340..d23a3292a

[PATCH 0/3] Fixes to bridge/panel and ingenic-drm

2021-01-17 Thread Paul Cercueil
Hi, Here are three independent fixes. The first one addresses a use-after-free in bridge/panel.c; the second one addresses a use-after-free in the ingenic-drm driver; finally, the third one makes the ingenic-drm driver work again on older Ingenic SoCs. Cheers, -Paul Paul Cercueil (3): drm

Re: [PATCH] seccomp: Add missing return in non-void function

2021-01-11 Thread Paul Cercueil
Le lun. 11 janv. 2021 à 12:04, Kees Cook a écrit : On Mon, Jan 11, 2021 at 05:28:39PM +, Paul Cercueil wrote: We don't actually care about the value, since the kernel will panic before that; but a value should nonetheless be returned, otherwise the compiler will complain. Fixes

[PATCH] seccomp: Add missing return in non-void function

2021-01-11 Thread Paul Cercueil
We don't actually care about the value, since the kernel will panic before that; but a value should nonetheless be returned, otherwise the compiler will complain. Fixes: 8112c4f140fa ("seccomp: remove 2-phase API") Cc: sta...@vger.kernel.org # 4.7+ Signed-off-by: Paul Cercueil -

Re: [PATCH v2 1/2] kconfig.h: Add IF_ENABLED() macro

2021-01-11 Thread Paul Cercueil
Hi, Le lun. 14 déc. 2020 à 10:05, Linus Walleij a écrit : On Mon, Dec 14, 2020 at 12:54 AM Paul Cercueil wrote: IF_ENABLED(CONFIG_FOO, ptr) evaluates to (ptr) if CONFIG_FOO is set to 'y' or 'm', NULL otherwise. The (ptr) argument must be a pointer. The IF_ENABLED() macro can be very

Re: [patch V3 13/37] mips/mm/highmem: Switch to generic kmap atomic

2021-01-10 Thread Paul Cercueil
Hi Thomas, Le sam. 9 janv. 2021 à 1:33, Thomas Bogendoerfer a écrit : On Sat, Jan 09, 2021 at 12:58:05AM +0100, Thomas Bogendoerfer wrote: On Fri, Jan 08, 2021 at 08:20:43PM +, Paul Cercueil wrote: > Hi Thomas, > > 5.11 does not boot anymore on Ingenic SoCs, I

Re: [patch V3 13/37] mips/mm/highmem: Switch to generic kmap atomic

2021-01-08 Thread Paul Cercueil
Hi Thomas, 5.11 does not boot anymore on Ingenic SoCs, I bisected it to this commit. Any idea what could be happening? Cheers, -Paul

Re: [PATCH] dt-bindings: Add missing array size constraints

2021-01-05 Thread Paul Cercueil
| 1 + .../devicetree/bindings/usb/ti,j721e-usb.yaml | 3 ++- .../bindings/usb/ti,keystone-dwc3.yaml| 2 ++ 74 files changed, 118 insertions(+), 33 deletions(-) For bindings/remoteproc/ingenic,vpu.yaml and devicetree/bindings/usb/ingenic,musb.yaml: Acked-by: Paul Cercueil Cheers, -Paul

Re: [PATCH] MIPS: boot: Fix unaligned access with?? CONFIG_MIPS_RAW_APPENDED_DTB

2020-12-29 Thread Paul Cercueil
Hi Thomas, Le mar. 29 déc. 2020 à 16:08, Thomas Bogendoerfer a écrit : On Mon, Dec 28, 2020 at 10:30:36PM +, Paul Cercueil wrote: Le lun. 28 déc. 2020 à 23:25, Thomas Bogendoerfer a écrit : > On Wed, Dec 16, 2020 at 11:39:56PM +0000, Paul Cercueil wrote: > > The compresse

Re: [PATCH] MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB

2020-12-28 Thread Paul Cercueil
Hi Thomas, Le lun. 28 déc. 2020 à 23:25, Thomas Bogendoerfer a écrit : On Wed, Dec 16, 2020 at 11:39:56PM +, Paul Cercueil wrote: The compressed payload is not necesarily 4-byte aligned, at least when compiling with Clang. In that case, the 4-byte value appended to the compressed

Re: [PATCH 1/2] mmc: jz4740: remove unused struct component card_detect_irq

2020-12-23 Thread Paul Cercueil
Hi, Le mer. 23 déc. 2020 à 10:01, H. Nikolaus Schaller a écrit : I have not found any user for this struct component. Signed-off-by: H. Nikolaus Schaller Reviewed-by: Paul Cercueil Cheers, -Paul --- drivers/mmc/host/jz4740_mmc.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH] phy: ingenic: Remove useless field .version

2020-12-23 Thread Paul Cercueil
Remove the useless field .version from the private structure, which is set but never read. Signed-off-by: Paul Cercueil --- drivers/phy/ingenic/phy-ingenic-usb.c | 23 --- 1 file changed, 23 deletions(-) diff --git a/drivers/phy/ingenic/phy-ingenic-usb.c b/drivers/phy

Re: [PATCH v4 5/5] clk: Ingenic: Clean up and reformat the code.

2020-12-23 Thread Paul Cercueil
Hi Zhou, Le lun. 21 déc. 2020 à 23:52, 周琰杰 (Zhou Yanjie) a écrit : 1.When the clock does not have "CGU_CLK_MUX", the 2/3/4 bits in parents do not need to be filled with -1. When the clock have a "CGU_CLK_MUX" has only one bit, the 3/4 bits of parents do not need to be filled with -1.

Re: [PATCH v4 4/5] clk: Ingenic: Add missing clocks for Ingenic SoCs.

2020-12-23 Thread Paul Cercueil
Hi Zhou, Le lun. 21 déc. 2020 à 23:52, 周琰杰 (Zhou Yanjie) a écrit : Add CIM, AIC, DMIC, I2S clocks for the X1000 SoC and the X1830 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) --- Notes: v1->v2: Add I2S clock for X1000. v2->v3: Correct the comment in x1000-cgu.c,

Re: [PATCH] MIPS: zboot: head.S clean up

2020-12-21 Thread Paul Cercueil
. Reported-by: Paul Cercueil Signed-off-by: Jiaxun Yang --- arch/mips/boot/compressed/head.S | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/arch/mips/boot/compressed/head.S b/arch/mips/boot/compressed/head.S index 409cb483a9ff..977218c90bc8 100644 --- a/arch/mips

Re: [PATCH] MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB

2020-12-16 Thread Paul Cercueil
Hi Nick, Le mer. 16 déc. 2020 à 18:08, Nick Desaulniers a écrit : On Wed, Dec 16, 2020 at 3:40 PM Paul Cercueil wrote: The compressed payload is not necesarily 4-byte aligned, at least when compiling with Clang. In that case, the 4-byte value appended to the compressed payload

[PATCH] dt-bindings/display: abt,y030xx067a: Fix binding

2020-12-16 Thread Paul Cercueil
ndings: display: Add ABT Y030XX067A panel bindings") Signed-off-by: Paul Cercueil --- .../devicetree/bindings/display/panel/abt,y030xx067a.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/panel/abt,y030xx067a.yaml b/D

[PATCH] MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB

2020-12-16 Thread Paul Cercueil
on MIPS (tested on a Ingenic JZ4770 board). Fixes: b8f54f2cde78 ("MIPS: ZBOOT: copy appended dtb to the end of the kernel") Cc: # v4.7 Signed-off-by: Paul Cercueil --- arch/mips/boot/compressed/decompress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch

[PATCH v2 2/2] pinctrl: ingenic: Only support SoCs enabled in config

2020-12-13 Thread Paul Cercueil
Tested on a JZ4740 system (ARCH=mips make qi_lb60_defconfig), this saves about 14 KiB, by allowing the compiler to garbage-collect all the functions and tables that correspond to SoCs that were disabled in the config. Signed-off-by: Paul Cercueil --- Notes: v2: Drop include drivers

[PATCH v2 1/2] kconfig.h: Add IF_ENABLED() macro

2020-12-13 Thread Paul Cercueil
= IF_ENABLED(CONFIG_FOO_SUSPEND, foo_suspend), }; The foo_suspend() function will now be automatically dropped by the compiler, and it does not require any specific attribute. Signed-off-by: Paul Cercueil --- Notes: v2: Only add IF_ENABLED() and don't verify that the argument

Re: [PATCH] MIPS: Ingenic: Disable HPTLB for D0 XBurst CPUs too

2020-12-13 Thread Paul Cercueil
Hi Zhou, Le lun. 14 déc. 2020 à 3:12, Zhou Yanjie a écrit : Hi Paul, On 2020/12/12 上午8:03, Paul Cercueil wrote: The JZ4760 has the HPTLB as well, but has a XBurst CPU with a D0 CPUID. Disable the HPTLB for all XBurst CPUs with a D0 CPUID. In the case where there is no HPTLB (e.g

[PATCH] clk: ingenic: Fix divider calculation with div tables

2020-12-12 Thread Paul Cercueil
with the hardware value 0, and a /1 divider otherwise. Fixes: a9fa2893fcc6 ("clk: ingenic: Add support for divider tables") Cc: # 5.2 Signed-off-by: Paul Cercueil --- drivers/clk/ingenic/cgu.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/clk/ingen

[PATCH] MIPS: Ingenic: Disable HPTLB for D0 XBurst CPUs too

2020-12-11 Thread Paul Cercueil
") Cc: # 5.4 Signed-off-by: Paul Cercueil --- arch/mips/kernel/cpu-probe.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index e6853697a056..31cb9199197c 100644 --- a/arch/mips/kernel/cpu-probe.c

[PATCH 2/2] pinctrl: ingenic: Rename registers from JZ4760_GPIO_* to JZ4770_GPIO_*

2020-12-11 Thread Paul Cercueil
Now that JZ4760 support has been fixed, it looks wrong to have JZ4760_GPIO_* registers being written if the SoC is a JZ4770 or later. Signed-off-by: Paul Cercueil --- drivers/pinctrl/pinctrl-ingenic.c | 54 +++ 1 file changed, 27 insertions(+), 27 deletions(-) diff

[PATCH 1/2] pinctrl: ingenic: Fix JZ4760 support

2020-12-11 Thread Paul Cercueil
with more than two. Fix it for the JZ4760, which has four configurable function modes. Fixes: 0257595a5cf4 ("pinctrl: Ingenic: Add pinctrl driver for JZ4760 and JZ4760B.") Cc: # 5.3 Signed-off-by: Paul Cercueil --- drivers/pinctrl/pinctrl-ingenic.c | 26 +---

Re: [PATCH 1/2] if_enabled.h: Add IF_ENABLED_OR_ELSE() and IF_ENABLED() macros

2020-12-09 Thread Paul Cercueil
Hi Linus, Le mer. 9 déc. 2020 à 9:59, Linus Walleij a écrit : On Tue, Dec 8, 2020 at 5:48 PM Paul Cercueil wrote: Introduce a new header , that brings two new macros: IF_ENABLED_OR_ELSE() and IF_ENABLED(). I understand what the patch is trying to do, but when we already have

Re: [PATCH 1/2] if_enabled.h: Add IF_ENABLED_OR_ELSE() and IF_ENABLED() macros

2020-12-09 Thread Paul Cercueil
Hi Ard, Le mer. 9 déc. 2020 à 10:38, Ard Biesheuvel a écrit : On Tue, 8 Dec 2020 at 17:49, Paul Cercueil wrote: Introduce a new header , that brings two new macros: IF_ENABLED_OR_ELSE() and IF_ENABLED(). IF_ENABLED_OR_ELSE(CONFIG_FOO, a, b) evaluates to (a) if CONFIG_FOO is set

Re: [PATCH 1/2] if_enabled.h: Add IF_ENABLED_OR_ELSE() and IF_ENABLED() macros

2020-12-08 Thread Paul Cercueil
Hi Randy, Le mar. 8 déc. 2020 à 9:39, Randy Dunlap a écrit : On 12/8/20 8:48 AM, Paul Cercueil wrote: Signed-off-by: Paul Cercueil Hi Paul, Why not just add these 2 new macros to ? Maybe you don't want to add the other 2 headers there also? That means including in , which causes

[PATCH 2/2] pinctrl: ingenic: Only support SoCs enabled in config

2020-12-08 Thread Paul Cercueil
Tested on a JZ4740 system (ARCH=mips make qi_lb60_defconfig), this saves about 14 KiB, by allowing the compiler to garbage-collect all the functions and tables that correspond to SoCs that were disabled in the config. Signed-off-by: Paul Cercueil --- drivers/pinctrl/pinctrl-ingenic.c | 61

[PATCH 1/2] if_enabled.h: Add IF_ENABLED_OR_ELSE() and IF_ENABLED() macros

2020-12-08 Thread Paul Cercueil
= { .suspend = IF_ENABLED(CONFIG_FOO_SUSPEND, foo_suspend), }; The foo_suspend() function will now be automatically dropped by the compiler, and it does not require any specific attribute. Signed-off-by: Paul Cercueil --- include/linux/if_enabled.h | 22 ++ 1 file changed, 22

Re: [PATCH] mmc: mediatek: mark PM functions as __maybe_unused

2020-12-08 Thread Paul Cercueil
Le mar. 8 déc. 2020 à 15:04, Arnd Bergmann a écrit : On Mon, Dec 7, 2020 at 1:33 PM Paul Cercueil wrote: Le ven. 4 déc. 2020 à 15:14, Arnd Bergmann a écrit By the way, as I'm ending up doing the same in a different context, I think it would be useful to have a IF_ENABLED() macro

Re: [PATCH 3/5] drm: Add and export function drm_gem_cma_mmap_noncoherent

2020-12-08 Thread Paul Cercueil
Hi Christoph, Le mar. 3 nov. 2020 à 19:13, Paul Cercueil a écrit : Hi Christoph, Le mar. 3 nov. 2020 à 18:50, Christoph Hellwig a écrit : On Mon, Nov 02, 2020 at 10:06:49PM +, Paul Cercueil wrote: This function can be used by drivers that need to mmap dumb buffers created with non

[PATCH 4/4] usb: musb: Support setting OTG mode using generic PHY

2020-12-07 Thread Paul Cercueil
When musb->xceiv is not provided but musb->phy is, support setting the OTG mode (host, peripheral) using the generic PHY framework. Signed-off-by: Paul Cercueil --- drivers/usb/musb/musb_gadget.c | 4 drivers/usb/musb/musb_host.c | 2 ++ 2 files changed, 6 insertions(+) diff

[PATCH 3/4] usb: musb: Allow running without a PHY

2020-12-07 Thread Paul Cercueil
Some platforms (e.g. JZ4740) can run without a PHY. Modify the core so that musb->xceiv is never deferenced without being checked first. Signed-off-by: Paul Cercueil --- drivers/usb/musb/musb_core.c| 2 +- drivers/usb/musb/musb_core.h| 12 ++-- drivers/usb/musb/musb_gadge

[PATCH 2/4] usb: musb: Add and use inline function musb_otg_state_string

2020-12-07 Thread Paul Cercueil
The musb_otg_state_string() simply calls usb_otg_state_string(). This will make it easier to get rid of the musb->xceiv dependency later. Signed-off-by: Paul Cercueil --- drivers/usb/musb/musb_core.c| 43 +++-- drivers/usb/musb/musb_core.h| 5 driv

[PATCH 1/4] usb: musb: Add and use inline functions musb_{get,set}_state

2020-12-07 Thread Paul Cercueil
HY subsystem. Signed-off-by: Paul Cercueil --- drivers/usb/musb/musb_core.c| 62 - drivers/usb/musb/musb_core.h| 11 ++ drivers/usb/musb/musb_debugfs.c | 6 ++-- drivers/usb/musb/musb_gadget.c | 28 +++ drivers/usb/musb/musb_host.c| 6 +

[PATCH 5/5] ASoC: codecs/jz4770: Add DAPM widget to set HP out to cap-less mode

2020-12-07 Thread Paul Cercueil
Cap-less mode is useful e.g. if the headphones are used as an antenna for a FM radio, so that the signal is not altered. For everything else, we want the cap-couple mode. Signed-off-by: Paul Cercueil --- sound/soc/codecs/jz4770.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions

[PATCH 4/5] ASoC: codecs/jz4770: Don't change cap-couple setting in HP PMU/PMD

2020-12-07 Thread Paul Cercueil
There is simply no reason to do that. Signed-off-by: Paul Cercueil --- sound/soc/codecs/jz4770.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/jz4770.c b/sound/soc/codecs/jz4770.c index 0da966785aee..909b70e817b4 100644 --- a/sound/soc/codecs

<    1   2   3   4   5   6   7   8   9   10   >